import request from '@/utils/request'

export default {

  list() {
    return request({
      url: `/main/user/list`,
      method: 'get'
    })
  },

  deleteById(id){
    return request({
      url: `/main/user/delete/${id}`,
      method: 'delete',
    })
  },
  getById(id){
    return request({
      url: `/main/user/getById/${id}`,
      method: 'get',
    })
  },
  update(user){
    return request({
      url: `/main/user/update`,
      method: 'put',
      data: user
    })
  },
  reset(id){
    return request({
      url: `/main/user/reset/${id}`,
      method: 'get',
    })
  },
  search(key){
    return request({
      url: `/main/user/search/${key}`,
      method: 'get',
    })
  }
}

